package com.baofu.paycore.service.processor.recharge;

import com.baofu.paycore.manager.model.RechargeBO;
import com.baofu.paycore.service.converter.DTO2BOConverter;
import com.baofu.paycore.service.facade.model.recharge.RechargeDTO;
import com.baofu.paycore.service.processor.PayBaseProcessor;
import org.springframework.stereotype.Component;

/**
 * 充值主单处理类
 *
 * <p/>
 *      1、构建支付属性
 * </p>
 * User: LZQ  Date: 2016/04/20 ProjectName: paycore Version: 5.0.0
 */
@Component
public class RechargeProcessor implements PayBaseProcessor<RechargeBO, RechargeDTO> {

    /**
     * 构建支付属性
     *
     * @param rechargeBO      支付模型
     * @param rechargeDTO     请求参数
     */
    @Override
    public PayBaseProcessor process(RechargeBO rechargeBO, RechargeDTO rechargeDTO) {

        //对象转换
        DTO2BOConverter.rechargeDTO2BO(rechargeDTO, rechargeBO);
        rechargeBO.setPayNo(rechargeBO.getPayNo());
        return this;
    }
}
